<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <title>登陆</title>
  </head>
  <body>
    <header>
      {% for message in get_flashed_messages() %}
      <div>{{ message }}</div>
      {% endfor %}
      <a href="{{ url_for('index') }}">返回首页</a>
    </header>
    <main>
      <form method="post">
        {{ form.csrf_token }}
        {{ form.username.label }}<br>
        {{ form.username }}<br>
        {% if form.username.errors %}
            {% for message in form.username.errors %}
            <small class="error">{{ message }}</small><br>
            {% endfor %}
        {% endif %}
        {{ form.password.label }}<br>
        {{ form.password }}<br>
        {% if form.password.errors %}
            {% for message in form.password.errors %}
            <small class="error">{{ message }}</small><br>
            {% endfor %}
        {% endif %}
        {{ form.remember }}{{ form.remember.label }}<br>
        {{ form.submit }}<br>
      </form>
  </main>
    <footer></footer>
  </body>
</html>
